/**
 * @description 清单服务类
 * @author AI Assistant
 * @date 2023-10-27
 */

import { BaseService } from './base'
import { STORAGE_KEYS } from '@/utils/storage'
import { List } from '@/models/list'

export class ListService extends BaseService {
  constructor() {
    super(STORAGE_KEYS.LISTS)
  }

  create(data) {
    const list = new List(data)
    return super.create(list.toJSON())
  }

  // 获取清单及其关联的分组和任务
  getListWithDetails(id) {
    const list = this.getById(id)
    if (!list) return null
    
    // 这里可以扩展获取分组和任务的逻辑
    return list
  }
} 